package com.fcx.workai.jinchang.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.util.Log;

import com.hxh.component.business.arouter.MyAppProvider;


/**
 *mainactivity view pager adapter
 */
public class HomePagerAdapter extends FragmentPagerAdapter {

    public HomePagerAdapter(FragmentManager fm) {
        super(fm);
    }


    @Override
    public Fragment getItem(int position) {
        Log.d("position--",position+"");
        Fragment fragment = null;
        switch (position) {
            case 0:
                fragment = MyAppProvider.getHomeFragment();
                break;
            case 1:
                fragment = MyAppProvider.getRecruitFragment();
                break;
            case 2:
                fragment = MyAppProvider.getEmployeeFragment();
                break;
            default:
                break;
        }
        return fragment;
    }

    @Override
    public int getCount() {
        return 3;
    }




}
